
import { App } from 'vue'
import VueAppConsumer from '@/configration/index'
/**
 * @description 加载所有 Plugins
 * @param  {ReturnType<typeofcreateApp>} app 整个应用的实例
 */
export function loadAllPlugins(app: App) {
  const files = require.context('.', true, /\.ts$/)
  files.keys().forEach(key => {
    let fileName = <string>key;
    if (!fileName.includes('index')) {
      let consumer= files(key).default as VueAppConsumer
      consumer.consumer(app)
    }
  })
}
